import request from '@/utils/request'
export default {
  list() {
    return request.post('/class/list')
  },
  page(params) {
    return request.post('/class/page', params)
  },

  add(data) {
    return request.post('/class/add', data)
  },

  edit(data) {
    return request.post('/class/edit', data)
  },

  delete(id) {
    return request.post('/class/delete', { id })
  },
  getCourses(class_id) {
    return request.post('/class/course/list', { class_id })
  },
  addCourse(data) {
    return request.post('/class/course/add', data)
  },
  deleteCourse(id) {
    return request.post('/class/course/delete', { id })
  }
}
